package org.taobao.ibatiside.codegen;

import org.apache.commons.lang.StringUtils;

public class MapV2SampleGen
{
  protected static String nl;
  public static synchronized MapV2SampleGen create(String lineSeparator)
  {
    nl = lineSeparator;
    MapV2SampleGen result = new MapV2SampleGen();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + NL + "<!DOCTYPE sqlMap" + NL + "        PUBLIC \"-//ibatis.apache.org//DTD SQL Map 2.0//EN\"" + NL + "        \"http://ibatis.apache.org/dtd/sql-map-2.dtd\">" + NL + "<sqlMap namespace=\"";
  protected final String TEXT_2 = "\">" + NL + "<!-- Leave you mapping here-->" + NL + "</sqlMap>";

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    
MapSampleModel model = (MapSampleModel)argument;

    stringBuffer.append(TEXT_1);
    stringBuffer.append(model.getNamespace());
    stringBuffer.append(TEXT_2);
    return stringBuffer.toString();
  }
}
